/**
 * 
 */
package com.itboye.allshengmedical.sci.cmd.resp;

/**
 * @author 贝贝 346551990@qq.com
 * @date   2016-12-8 
 */
public class ResultData {

	
	
	public Boolean isSuccess(){
		return code == 0;
	}
	

	private int    code;
	private byte[] data;
	private String msg;

	public void setSuccess(byte[] data,String msg){
		this.code = 0;
		this.data = data;
		this.msg = msg;
	}

	public void setFail(byte[] data,String msg){
		this.code = -1;
		this.data = data;
		this.msg = msg;
	}
	
	public void setSuccess(){
		this.code = 0;
	}
	
	public void setFail(){
		this.code = -1;
	}
	
	public int getCode() {
		return code;
	}

	
	public byte[] getData() {
		return data;
	}
	public void setData(byte[] data) {
		this.data = data;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	
	
}
